package COM.ZYC06;

public class FruitTest {
    public static void main(String[] args) {
        Fruit fruit1 = new Apple();
        fruit1.setName("苹果");
        fruit1.setArea("云南");
        fruit1.setPrice(4);
        System.out.println(fruit1);
       Fruit  fruit2 = new Banana();
       fruit2.setName("香蕉");
       fruit2.setArea("中国");
       fruit2.setPrice(8);
        System.out.println(fruit2);
       Fruit  fruit3 = new Coconut();
       fruit3.setName("椰子");
       fruit3.setArea("海南");
       fruit3.setPrice(9);
       System.out.println(fruit3);
    }
}
